// d_init include client
diag_log [diag_frameno, diag_ticktime, time, "Executing Dom i_client.sqf"];

// position of the player ammobox at base (created only on the players computer, refilled every 20 minutes)
#ifndef __TT__
_mpos = markerPos QGVAR(player_ammobox_pos);
_mpos set [2,0];
GVAR(player_ammobox_pos) = [_mpos, markerDir QGVAR(player_ammobox_pos)];
deleteMarkerLocal QGVAR(player_ammobox_pos);
#else
_mpos = markerPos QGVAR(player_ammobox_pos_w);
_mpos set [2,0];
GVAR(player_ammobox_pos) = [[_mpos, markerDir QGVAR(player_ammobox_pos_w)]];
_mpos = markerPos QGVAR(player_ammobox_pos_e);
_mpos set [2,0];
GVAR(player_ammobox_pos) set [count GVAR(player_ammobox_pos), [_mpos, markerDir QGVAR(player_ammobox_pos_e)]];
deleteMarkerLocal QGVAR(player_ammobox_pos);
deleteMarkerLocal QGVAR(player_ammobox_pos_e);
#endif

//TYRGHEN added the creation of a restriction zone to create units of your own side.
#ifdef __DEFAULT__
_mpos = markerPos QGVAR(base_marker);
_mpos set [2,0];
_hasbasemarker = str(_mpos) != "[0,0,0]";
_msize = markerSize QGVAR(base_marker);
if (_hasbasemarker) then {
	ACV_OwnSideCreationAreas = [[_mpos, markerSize QGVAR(base_marker), markerDir QGVAR(base_marker),true]];
};
#endif
#ifdef __TT__
_mpos = markerPos QGVAR(base_marker_w);
_mpos set [2,0];
_mpos2 = markerPos QGVAR(base_marker_e);
_mpos2 set [2,0];
_hasbasemarker = (str(_mpos) != "[0,0,0]") && (str(_mpos2) != "[0,0,0]");
if (_hasbasemarker) then {
	if (playerSide == west) then {
		ACV_OwnSideCreationAreas = [[_mpos, markerSize QGVAR(base_marker_w), markerDir QGVAR(base_marker_w),true]];
	} else {
		ACV_OwnSideCreationAreas = [[_mpos2, markerSize QGVAR(base_marker_e), markerDir QGVAR(base_marker_e),true]];
	};
};
#endif
